<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MessageEvent</title>
</head>

<body>
    <script type="module">
        import { messageEvent, MessageEvent } from './dist/index.js';
        const message2 = new MessageEvent({});

        // 用户退出登录
        message2.on('system::userLogout', (data) => {
            console.log('system::userLogout', data);
        })


        setTimeout(() => {
            message2.emit('system::userLogout', 111)
        }, 1000)
    </script>
</body>

</html>
